CREATE TABLE [dbo].[TDFINA_BANC]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[CO_TIPO_FINA] [dbo].[TD_VC_003] NOT NULL,
[NU_COMP_FINA] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [int] NOT NULL CONSTRAINT [DF__TDFINA_BA__NU_SE__4885B9BB] DEFAULT ((0)),
[TI_ENTI] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CO_ENTI] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CO_GRUP_ECON] [varchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TI_DOCU_ENTI] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NU_DOCU_ENTI] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CO_MONE_DOCU] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FE_DOCU] [datetime] NULL,
[FE_VENC] [datetime] NULL,
[FE_SALI_EMBQ] [datetime] NULL,
[FA_CAMB_EXTR] [numeric] (15, 6) NULL,
[IM_DOCU] [numeric] (16, 4) NULL CONSTRAINT [DF__TDFINA_BA__IM_DO__4979DDF4] DEFAULT ((0)),
[IM_FINA] [numeric] (16, 4) NULL CONSTRAINT [DF__TDFINA_BA__IM_FI__4A6E022D] DEFAULT ((0)),
[IM_SALD_DOCU] [numeric] (16, 4) NULL CONSTRAINT [DF__TDFINA_BA__IM_SA__4B622666] DEFAULT ((0)),
[IM_CONV_DOCU] [numeric] (16, 4) NULL CONSTRAINT [DF__TDFINA_BA__IM_CO__4C564A9F] DEFAULT ((0)),
[CO_USUA_CREA] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__TDFINA_BA__CO_US__4D4A6ED8] DEFAULT (suser_sname()),
[FE_USUA_CREA] [datetime] NULL CONSTRAINT [DF__TDFINA_BA__FE_US__4E3E9311] DEFAULT (getdate()),
[CO_USUA_MODI] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__TDFINA_BA__CO_US__4F32B74A] DEFAULT (suser_sname()),
[FE_USUA_MODI] [datetime] NULL CONSTRAINT [DF__TDFINA_BA__FE_US__5026DB83] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDFINA_BANC] ADD CONSTRAINT [PK__TDFINA_B__AD20C5C5601E1781] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [CO_TIPO_FINA], [NU_COMP_FINA], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDFINA_BANC] ADD CONSTRAINT [FK__TDFINA_BANC__4DEA58AD] FOREIGN KEY ([CO_EMPR], [CO_TIPO_FINA], [CO_BANC], [NU_COMP_FINA]) REFERENCES [dbo].[TCFINA_BANC] ([CO_EMPR], [CO_TIPO_FINA], [CO_BANC], [NU_COMP_FINA])
GO
